package datastructure.map;

import datastructure.set.Set;

/**
 * Description：
 * Author: zhangc
 * Date：2017/6/19 21:13
 */
public interface Map<K, V> extends Iterable<Map.Entry<K, V>> {

    boolean put(K key, V value);

    V get(K key);

    boolean containsKey(K key);

    boolean containsValue(V value);

    void remove(K key);

    boolean isEmpty();

    int size();

    Set<Entry<K, V>> entrySet();

    Set<K> keySet();

    interface Entry<K, V> {
        K getKey();

        V getValue();

        void setValue(V value);

        int hashcode();

        boolean equals(Entry<K, V> entry);
    }

}
